home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
vericard.zip
/
VC.PAS
next >
Wrap
Pascal/Delphi Source File
|
1993-04-19
|
2KB
|
81 lines
{$A-,B+,D-,E-,F-,I+,L-,N-,O-,R+,S+,V+}
{$M 2048,0,4096}
program ValiCard;
{ Test routine for the Mod 10 Check Digit CC validator... }
uses
dos,
crt,
VeriCard;
var
card : string[22];
k : char;
procedure Squawk(Noise : byte);
begin
case Noise of
1 : begin
Sound(400);
Delay(200);
Sound(200);
Delay(200);
Nosound
end;
2 : begin
Sound(392);
Delay(55);
Nosound;
Delay(30);
Sound(523);
Delay(55);
Nosound;
Delay(30);
Sound(659);
Delay(55);
Nosound;
Delay(30);
Sound(784);
Delay(277);
Nosound;
Delay(30);
Sound(659);
Delay(55);
Nosound;
Delay(30);
Sound(784);
Delay(1200);
Nosound
end
end { case }
end;
BEGIN
k := #0;
clrscr;
fillchar(card, 22, #0);
writeln('VC: Integer Modulo-10 Visa/Mastercard/Amex Check-Digit');
writeln(' verification routine. (c) 1990 Daniel J. Karnes');
writeln;
write(' Please enter a Credit Card number: ');
readln(card);
writeln;
writeln;
if (length(card) > 12) then
k := Vc(card);
if (k in ['3', '4', '5']) then
Squawk(2)
else
Squawk(1);
case k of
#0 : writeln(' Could NOT verify this number with any card type.');
'3' : writeln(' Card was verified as a valid Amex Card Number.');
'4' : writeln(' Card was verified as a valid VISA Card Number.');
'5' : writeln(' Card was verified as a valid Mastercard Number.')
end
END.